From 5ab2377afaca1e8e27a7c069edf789a41938fcf5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Wed, 23 Nov 2016 20:19:44 +0100 Subject: [PATCH] widget: Remove gtk_widget_style_get_property --- docs/reference/gtk/gtk4-sections.txt | 1 - gtk/gtkwidget.c | 55 ---------------------------- gtk/gtkwidget.h | 4 -- 3 files changed, 60 deletions(-) diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt index 0791d1e6c4..324dde559d 100644 --- a/docs/reference/gtk/gtk4-sections.txt +++ b/docs/reference/gtk/gtk4-sections.txt @@ -4566,7 +4566,6 @@ gtk_widget_class_find_style_property gtk_widget_class_list_style_properties gtk_widget_send_focus_change gtk_widget_style_get -gtk_widget_style_get_property gtk_widget_style_get_valist gtk_widget_class_set_accessible_type gtk_widget_class_set_accessible_role diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index a3e12931d4..0be6b0df27 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -11453,61 +11453,6 @@ gtk_widget_class_list_style_properties (GtkWidgetClass *klass, return pspecs; } -/** - * gtk_widget_style_get_property: - * @widget: a #GtkWidget - * @property_name: the name of a style property - * @value: location to return the property value - * - * Gets the value of a style property of @widget. - */ -void -gtk_widget_style_get_property (GtkWidget *widget, - const gchar *property_name, - GValue *value) -{ - GParamSpec *pspec; - - g_return_if_fail (GTK_IS_WIDGET (widget)); - g_return_if_fail (property_name != NULL); - g_return_if_fail (G_IS_VALUE (value)); - - g_object_ref (widget); - pspec = g_param_spec_pool_lookup (style_property_spec_pool, - property_name, - G_OBJECT_TYPE (widget), - TRUE); - if (!pspec) - g_warning ("%s: widget class '%s' has no property named '%s'", - G_STRLOC, - G_OBJECT_TYPE_NAME (widget), - property_name); - else - { - GtkStyleContext *context; - const GValue *peek_value; - - context = _gtk_widget_get_style_context (widget); - - peek_value = _gtk_style_context_peek_style_property (context, - G_OBJECT_TYPE (widget), - pspec); - - /* auto-conversion of the caller's value type - */ - if (G_VALUE_TYPE (value) == G_PARAM_SPEC_VALUE_TYPE (pspec)) - g_value_copy (peek_value, value); - else if (g_value_type_transformable (G_PARAM_SPEC_VALUE_TYPE (pspec), G_VALUE_TYPE (value))) - g_value_transform (peek_value, value); - else - g_warning ("can't retrieve style property '%s' of type '%s' as value of type '%s'", - pspec->name, - g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)), - G_VALUE_TYPE_NAME (value)); - } - g_object_unref (widget); -} - /** * gtk_widget_style_get_valist: * @widget: a #GtkWidget diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h index ed3bfbbfbc..33db17d6e4 100644 --- a/gtk/gtkwidget.h +++ b/gtk/gtkwidget.h @@ -988,10 +988,6 @@ GDK_AVAILABLE_IN_ALL GParamSpec** gtk_widget_class_list_style_properties (GtkWidgetClass *klass, guint *n_properties); GDK_AVAILABLE_IN_ALL -void gtk_widget_style_get_property (GtkWidget *widget, - const gchar *property_name, - GValue *value); -GDK_AVAILABLE_IN_ALL void gtk_widget_style_get_valist (GtkWidget *widget, const gchar *first_property_name, va_list var_args); -- 2.30.2